#include <iostream>
#include <unordered_map>

using namespace std;
unordered_map<int, int> mp;
int n;
int main()
{
    cin >> n;
    for(int i = 1; i <= n; i++) 
    {
        int x; cin >> x;
        mp[x]++;
    }
    if((mp.count(-1) && mp.count(1)) || (!mp.count(-1) && !mp.count(1))) cout << "YES" << endl;
    else cout << "NO" << endl;
    return 0;
}